

<template>
	<view class="page">
		<theme-navbar :is-white="false" :title="navTitle" :custom-back="retailBack" style="z-index: 99999">
		</theme-navbar>
		<view class="content" style="width: 100%">
			<view>
				<me-table :style="{ 'border-top': '2px solid #c1c1c1' }" :i="0" :index="0" :load-data="loadData"
					:init-load="false" ref="mescrollItem0">
					<view slot-scope="d" class="list-lay">
						<view class="lt-root">
							<view class="content-nt-lay">
								<view class="content-title">
									<text class="content-text">{{ d.data.bcb_name }}</text>
								</view>
								<view class="content-num" @tap="itemClick(d.data)">
									<text>{{ d.data.remind_num }}</text>
								</view>
							</view>
						</view>
					</view>
				</me-table>
			</view>
		</view>

	</view>
</template>

<script>
	import certificateService from '@/service/certificate/certificate.service.js';
	import {
		SET_MAP_LAT_LON,
	} from '@/config/setting.config.js';
	import USearch from '../../../uview-ui/components/u-search/u-search.vue';
	import UIcon from '../../../uview-ui/components/u-icon/u-icon.vue';
	import meTable from '@/components/me-table.vue';
	import MescrollMoreMixin from "@/components/mescroll-uni/mixins/mescroll-more.js";
	import commonService from "@/service/common/common.service.js";
	export default {
		components: {
			UIcon,
			USearch,
			meTable,
		},
		mixins: [MescrollMoreMixin],
		data() {
			return {
				markers: [],
				currPosition: undefined,
				archiveList: [],
				northeastLatitude: '',
				northeastLongitude: '',
				southwestLatitude: '',
				southwestLongitude: '',
				cluster: undefined,
				searchPlac: '',
				judgmentId: '',
				title: '',
				orgUuid: '',
				positionPicker: undefined,
				showList: true,
				detailShow: false,
				detailData: {},
				user: this.$storage.get(this.$rp.common.USER),
			};
		},
		onLoad(opt) {

		},
		mounted() {
			this.init();
			this.setRightBtns();
		},
		methods: {
			init() {
				this.loadData();
			},
			// 返回按钮
			retailBack() {
				this.$deviceApi.nfcStop && this.$deviceApi.nfcStop();
				let self = this;
				self.backPrev({
					paramKey: 'data',
					param: {},
				});
			},
			loadData() {
				return new Promise((resolve) => {
					certificateService.getIndexWarningType().then(res => {
						if (res.success) {
							resolve({
								count: res.count,
								data: [...res.data, ],
							});
						} else {
							resolve({
								count: 0,
								data: [],
							})
						}
					}).catch(err => {
						resolve({
							count: 0,
							data: [],
						});
					});
				})
			},
			itemClick(item) {
				let code = 'M_MARKET_WARING';
				let key = 'RANDOM_WARING_DAYS';
				if (item.bcb_code == 'RANDOM_TASK_WARING' || item.bcb_code == 'EMPHASIS_TASK_WARIN') {
					if (item.bcb_code == 'RANDOM_TASK_WARING') {
						key = "RANDOM_WARING_DAYS";
					} else {
						key = "EMPHASIS_WARING_DAYS";
					}
					let day = 0;
					commonService.getSysConfig(code, key).then(d => {
						if (d.success && d.msg) {
							day = parseInt(d.msg);
							this.$u.route('pages/query/marketWarning/marketWarningDetail', {
								id: item.bcb_code,
								day: day,
							});
						} else {
							this.$u.toast(d.msg);
						}
					});
				} else {
					this.$u.route('pages/query/marketWarning/marketWarningDetail', {
						id: item.bcb_code,
						dayPlanType: item.bcb_code == 'RANDOM_DAY_PLAN_WARING' ? '02' : '01'
					});
				}
			}
		}
	};
</script>

<style scoped lang="scss">
	.page {
		padding: 0;
	}

	@import 'style/certificate/common.scss';

	.nolicence-search-lay {
		position: fixed;
		// #ifndef H5-DINGDING
		top: 44px;
		// #endif
		// #ifdef H5-DINGDING
		top: 0px;
		// #endif
		z-index: 99;
		width: 100%;
		padding: $cm-search-padding-row 0;
	}

	.search-right-icon {
		display: flex;
		position: absolute;
		right: 8%;
	}

	uni-page-body {
		min-height: 100%;
		width: 100%;
		background-color: #f1f0f6;
	}

	#container {
		width: 100%;
		height: calc(100% - 88px);
	}

	.u-search-title {
		background: #fff;
		padding: 10px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 44px;
	}

	.u-search-btn {
		height: 44px;
		line-height: 44px;
		// padding: 0 10px;
		display: flex;
		align-items: center;
		margin: 0 20rpx;

		.u-confirm-btn {
			height: 32px;
			margin-left: 10px;
		}
	}

	// 搜索框内容
	.u-serach-info {
		background-color: #f4f4f5;
		position: fixed;
		/* #ifdef H5-DINGDING  */
		top: 0px;
		/* #endif */
		/* #ifndef H5-DINGDING  */
		top: calc(var(--status-bar-height) + 44px);
		/* #endif */
		z-index: 1;
		width: 100%;
		padding-right: 11px;
	}

	.u-l-item {
		margin-top: 88px;
	}

	.cur-loc {
		position: absolute;
		bottom: 30px;
		left: 10px;
		padding: 5px;
		background: #fff;
		width: 35px;
		height: 35px;
		box-shadow: 0px 0px 0px 1px #ddd;
	}

	.detail-title {
		height: 70px;
		text-align: center;
		padding: 20px;
		font-weight: 600;
		color: $u-main-color;
		border-bottom: 1px solid #c1c1c1;

		.detail-close {
			float: right;
			margin-top: 5px;
		}

		.detail-title-text {
			font-size: 33rpx;
		}

		span {
			font-size: 30rpx;
		}
	}

	.contetnt-border {
		padding: 15px !important;
	}

	.content {
		background-color: #F3F4F5;
		min-height: 100%;
	}

	.page {
		padding: 0;
	}

	.nolicence-search {
		padding: $cm-search-padding-row $cm-search-padding-column;
	}

	.list-lay {
		// border-bottom: 2rpx solid $u-border-color;
		padding: 40rpx 20rpx;
		background-color: #FFF;
		margin: 20rpx 0;
	}



	.left-tag {
		padding: 4px 12px 0 2px
	}

	.content-nt-lay {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-pack: justify;
		-webkit-justify-content: space-between;
		justify-content: space-between;
		flex-wrap: wrap;
		flex-direction: row;
		width: 100%;
		align-items: center;
	}

	.content-title-lay {
		display: inline-flex;
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
		align-items: center;
		padding: 10rpx 6rpx;
		word-break: break-all;
		flex: 1;
	}

	.content-title-lay-special {
		display: inline-flex;
		flex-direction: row;
		width: 100%;
		align-items: center;
		padding: 10rpx 6rpx;
		word-break: break-all;
		flex: 1;
	}

	.content-title {
		font-weight: 600;
		font-size: 30rpx;
		color: $u-main-color;
	}

	.content-sub-title-lay {
		margin-top: 20rpx;
		margin-bottom: 20rpx;
		display: inline-flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 10rpx 6rpx;
		font-size: 26rpx;
		color: $cm-form-subtitle-color;
	}

	.content-sub-title {
		color: $cm-form-subtitle-color;
		font-size: $cm-form-item-label-font-size;
	}

	.content-num {
		font-size: 50rpx;
		font-weight: 700;
		color: #eb7e10;
	}
</style>